---
title: Vert.x 3.5.0.Beta1
category: releases
authors:
  - name: Julien Viet
    github_id: vietj
summary: It's summer time and we have just released Vert.x 3.5.0.Beta1!
---

It's summer time and we have just released Vert.x 3.5.0.Beta1!

## Let's go RxJava2

First and foremost this release delivers the RxJava2 API with support of its full range of types.

In addition of `Single`, Rxified APIs expose also the`Completable` and `Maybe` types

```java
// expose Handler<AsyncResult<Void>>
Completable completable = server.rxClose();

completable.subscribe(() -> System.out.println("closed"));

// expose Handler<AsyncResult<String>> where the result can be null
Maybe<String> ipAddress = dnsClient.rxLookup("www.google.com");
ipAddress.subscribe(
  value -> System.out.println("resolved to " + value),
  err -> err.printStackTrace(),
  () -> System.out.println("does not resolve"));
```

RxJava augments Vert.x streams with a `toObservable()` method, RxJava2 adds the `toFlowable()` method:

```java
// Flowable<Buffer> maps to a ReadStream<Buffer>
// back-pressured stream
Flowable<Buffer> flowable = asyncFile.toFlowable();

// but we still can get an Observable<Buffer>
// non back-pressured stream
Observable<Buffer> flowable = asyncFile.toObservable();
```

What's so different between `Flowable` and `Observable` ? the former handles back-pressure, i.e the
subscriber can control the flow of items and the later can not!!!

You can read the documentation in the beta section of the [docs](http://vertx.io/docs/3.5.0.Beta1/vertx-rx/java2/)
or go straight to the [examples](https://github.com/vert-x3/vertx-examples/tree/3.5.0.beta1/rxjava2-examples)

## MQTT Client

In Vert.x 3.4 we added the MQTT server, 3.5 completes the MQTT story with the MQTT client:

```java
MqttClient mqttClient = MqttClient.create(vertx,
   new MqttClientOptions()
     .setPort(BROKER_PORT)
     .setHost(BROKER_HOST)).connect(ar ->
  if (ar.succeeded()) {
    System.out.println("Connected to a server");

    mqttClient.publish(
      MQTT_TOPIC,
      Buffer.buffer(MQTT_MESSAGE),
      MqttQoS.AT_MOST_ONCE,
      false,
      false,
      s -> mqttClient.disconnect(d -> System.out.println("Disconnected from server")));
  } else {
    System.out.println("Failed to connect to a server");
    ar.cause().printStackTrace();
  }
});
```

You can find MQTT client and server examples [here](https://github.com/vert-x3/vertx-examples/tree/3.5.0.beta1/mqtt-examples)

## Auth handler chaining

There are times when you want to support multiple authN/authZ mechanisms in a single application.

Vert.x Web supports auth handlers [chaining](http://vertx.io/docs/3.5.0.Beta1/vertx-web/java/#_chaining_multiple_auth_handlers)

```java
ChainAuthHandler chain = ChainAuthHandler.create();

// add http basic auth handler to the chain
chain.append(BasicAuthHandler.create(provider));

// add form redirect auth handler to the chain
chain.append(RedirectAuthHandler.create(provider));

// secure your route
router.route("/secure/resource").handler(chain);

// your app
router.route("/secure/resource").handler(ctx -> {
  // do something...
});
```

## Finally

This beta also provides

- Vert.x Config stores for Vault and Consul
- Upgrade to Hazelcast 3.8.2

## Use it!

You can use and consume it in your projects from Maven or Gradle as usual with the version `3.5.0.Beta1` or read

 - the [documentation preview](http://vertx.io/docs/index-beta.html)
 - see the [examples](https://github.com/vert-x3/vertx-examples/tree/3.5.0.beta1)

You can also download various binaries from Maven Central:

- [base distrib](https://search.maven.org/remotecontent?filepath=io/vertx/vertx-stack-manager/3.5.0.Beta1/vertx-stack-manager-3.5.0.Beta1.tar.gz)
- [full distrib](https://search.maven.org/remotecontent?filepath=io/vertx/vertx-stack-manager/3.5.0.Beta1/vertx-stack-manager-3.5.0.Beta1-full.tar.gz)
- [docs zip](https://search.maven.org/remotecontent?filepath=io/vertx/vertx-stack-manager/3.5.0.Beta1/vertx-stack-manager-3.5.0.Beta1-docs.zip)
- [scala distrib](https://search.maven.org/remotecontent?filepath=io/vertx/vertx-stack-manager/3.5.0.Beta1/vertx-stack-manager-3.5.0.Beta1-stack-scala.tar.gz)

as usual feedback is very important to us and one goal of this beta release is to let the community
provide early feedback!

The final is expected at the beginning of October.

Enjoy
